package com.ponhu.ea2.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.util.unit.DataSize;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @author zhaokai
 * 商品中心业务配置类
 */
@Data
@Component
@ConfigurationProperties(prefix = "goods.config.biz", ignoreInvalidFields = false)
public class GoodsProperties {

    /**
     * 默认商品卖点文案
     */
    private String defaultGoodsSelling;

    /**
     * 默认商品卖点文案语音地址
     */
    private String defaultGoodsSellingAudioUrl;

    /**
     * 上传图片大小MB
     */
    private DataSize uploadImageSize;

    /**
     * 上传图片超出大小提示信息
     */
    private String uploadImageTips;

    /**
     * erp的渠道
     */
    private Map<String, String> erpChannelMap;

    /**
     * 推送采购状态
     */
    private Boolean enablePushPurchase = false;

    /**
     * 推送创纪云状态
     */
    private Boolean enablePushChuangji = false;

    /**
     * bms 日志打印状态
     */
    private Boolean enableBmsLogPrintStatus = true;

    /**
     * provider 日志打印状态
     */
    private Boolean enableProviderLogPrintStatus = true;

    /**
     * 包小检识图功能开关
     */
    private Boolean bxjOpen = false;

    /**
     * 不启用出参日志的接口地址
     */
    private List<String> unableLogUrl = new ArrayList<>();

    /**
     * 日志最大输出文本大小
     */
    private Integer maxLogPrintSize;

    /**
     * 推送mq开关
     */
    private Boolean mqswitch = false;

    /**
     * Exchanges
     */
    private Map<String, String> exchangesMap;

    /**
     * 推送mq，routingkey
     */
    private Map<String, String> routingKeyMap;

    /**
     * 推送mq，分割条数
     */
    private Map<String, Integer> mqLimitMap;

    /**
     * 选品接口是否使用ES
     */
    private Boolean useEsForPickInventory = false;

    /**
     * es选品索引名称或别名
     */
    private String ES_INDEX_PICK_INVENTORY = "wyt_goods_center_pick_inventory";
}
